package com.example.points.service;

import com.example.points.domain.UserPoints;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;

public interface UserPointsService extends IService<UserPoints> {
    
    /**
     * 查询用户积分
     */
    UserPoints getUserPoints(Long userId);
    
    /**
     * 用户积分充值
     */
    boolean rechargePoints(Long userId, Long points, String description);
    
    /**
     * 用户积分消费
     */
    boolean consumePoints(Long userId, Long points, String description);
    
    /**
     * 批量充值积分
     */
    boolean batchRechargePoints(List<Long> userIds, Long points, String description);
    
    /**
     * 批量消费积分
     */
    boolean batchConsumePoints(List<Long> userIds, Long points, String description);
    
    /**
     * 冻结积分
     */
    boolean freezePoints(Long userId, Long points);
    
    /**
     * 解冻积分
     */
    boolean unfreezePoints(Long userId, Long points);

    /**
     * 过期积分处理
     */
    void handleExpiredPoints();
}